package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchMonitoringItemConfigMapper;
import com.ruoyi.system.domain.DispatchMonitoringItemConfig;
import com.ruoyi.system.service.IDispatchMonitoringItemConfigService;

/**
 * 监测量配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchMonitoringItemConfigServiceImpl implements IDispatchMonitoringItemConfigService 
{
    @Autowired
    private DispatchMonitoringItemConfigMapper dispatchMonitoringItemConfigMapper;

    /**
     * 查询监测量配置
     * 
     * @param monitoringItemConfigId 监测量配置主键
     * @return 监测量配置
     */
    @Override
    public DispatchMonitoringItemConfig selectDispatchMonitoringItemConfigByMonitoringItemConfigId(Long monitoringItemConfigId)
    {
        return dispatchMonitoringItemConfigMapper.selectDispatchMonitoringItemConfigByMonitoringItemConfigId(monitoringItemConfigId);
    }

    /**
     * 查询监测量配置列表
     * 
     * @param dispatchMonitoringItemConfig 监测量配置
     * @return 监测量配置
     */
    @Override
    public List<DispatchMonitoringItemConfig> selectDispatchMonitoringItemConfigList(DispatchMonitoringItemConfig dispatchMonitoringItemConfig)
    {
        return dispatchMonitoringItemConfigMapper.selectDispatchMonitoringItemConfigList(dispatchMonitoringItemConfig);
    }

    /**
     * 新增监测量配置
     * 
     * @param dispatchMonitoringItemConfig 监测量配置
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchMonitoringItemConfig(DispatchMonitoringItemConfig dispatchMonitoringItemConfig)
    {
        return dispatchMonitoringItemConfigMapper.insertDispatchMonitoringItemConfig(dispatchMonitoringItemConfig);
    }

    /**
     * 修改监测量配置
     * 
     * @param dispatchMonitoringItemConfig 监测量配置
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchMonitoringItemConfig(DispatchMonitoringItemConfig dispatchMonitoringItemConfig)
    {
        return dispatchMonitoringItemConfigMapper.updateDispatchMonitoringItemConfig(dispatchMonitoringItemConfig);
    }

    /**
     * 批量删除监测量配置
     * 
     * @param monitoringItemConfigIds 需要删除的监测量配置主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringItemConfigByMonitoringItemConfigIds(Long[] monitoringItemConfigIds)
    {
        return dispatchMonitoringItemConfigMapper.deleteDispatchMonitoringItemConfigByMonitoringItemConfigIds(monitoringItemConfigIds);
    }

    /**
     * 删除监测量配置信息
     * 
     * @param monitoringItemConfigId 监测量配置主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringItemConfigByMonitoringItemConfigId(Long monitoringItemConfigId)
    {
        return dispatchMonitoringItemConfigMapper.deleteDispatchMonitoringItemConfigByMonitoringItemConfigId(monitoringItemConfigId);
    }
}
